import { ColumnsType } from 'ant-design-vue/lib/table'
//选择模板文件表格列表字段
export const columnsList: any = [
  {
    title: '文件名称',
    dataIndex: 'fileName',
    minWidth: 130
  },
  {
    title: '是否必传文件',
    dataIndex: 'requireFile',
    hideTitle: true,
    minWidth: 110
  },
  {
    title: '是否必填版本信息',
    dataIndex: 'requireVersion',
    hideTitle: true,
    minWidth: 140
  },
  {
    title: '文件数量',
    dataIndex: 'fileAmount',
    minWidth: 90
  },
  {
    title: '文件格式',
    dataIndex: 'fileFormat',
    minWidth: 120
  },
  {
    title: '是否需要电子签署',
    dataIndex: 'signFlag',
    hideTitle: true,
    minWidth: 140
  },
  {
    title: '模板文件',
    dataIndex: 'templateFile',
    minWidth: 180,
    hideTitle: true
  }
]
// 当前任务下文件清单表格
export const taskColumnsList: any = [
  {
    title: '文件名称',
    dataIndex: 'fileName',
    minWidth: 150,
    ellipsis: { showTitle: true }
  },
  {
    title: '是否必传文件',
    dataIndex: 'requireFile',
    minWidth: 130,
    hideTitle: true
  },
  {
    title: '是否必填版本信息',
    dataIndex: 'requireVersion',
    minWidth: 140,
    hideTitle: true
  },
  {
    title: '文件数量',
    dataIndex: 'fileAmount',
    minWidth: 80
  },
  {
    title: '文件格式',
    dataIndex: 'fileFormat',
    minWidth: 120
  },
  {
    title: '模板文件',
    dataIndex: 'templateFile',
    minWidth: 200,
    ellipsis: { showTitle: true },
    hideTitle: true
  },
  {
    title: '是否允许后补',
    dataIndex: 'complementFile',
    minWidth: 120,
    ellipsis: { showTitle: true },
    hideTitle: true
  },
  {
    title: '是否需要电子签署',
    dataIndex: 'signFlag',
    minWidth: 140,
    hideTitle: true
  },
  {
    title: '文件归档路径',
    dataIndex: 'pathName',
    minWidth: 160,
    ellipsis: { showTitle: true }
  },
  {
    title: '操作',
    dataIndex: 'edit',
    minWidth: 150,
    align: 'left',
    fixed: 'right',
    ellipsis: { showTitle: true },
    hideTitle: true
  }
]
export const initForm = () => {
  return {
    taskId: '',
    templateFileList: [],
    templateFile: '',
    newRequireFile: false,
    requireFile: 0,
    requireVersion: 0,
    fileName: '',
    newRequireVersion: false,
    complementFile: 0,
    newComplementFile: false,
    fileFormat: <any>[],
    fileDesc: '',
    fileAmount: 0,
    displayOrder: null,
    archiveFolderId: '',
    speedFolderId: '',
    pathName: '',
    signFlag: 0,
    signWay: []
  }
}

export const signSet: ColumnsType = [
  {
    title: '审批节点名称',
    dataIndex: 'nodeName',
    minWidth: 120,
    ellipsis: { showTitle: true }
  },
  {
    title: '节点序号',
    dataIndex: 'nodeNumber',
    minWidth: 90
  },
  {
    title: '签名主体',
    dataIndex: 'signMainName',
    minWidth: 100
  },
  {
    title: '签署方式',
    dataIndex: 'signWay',
    minWidth: 100
  },
  {
    title: '签署结果',
    dataIndex: 'signResult',
    minWidth: 100
  }
]
